import Vue from 'vue'
import VueRouter from 'vue-router'
import createRouter from './router/router'
import Vuex from 'vuex'
import createStore from './store/store'
import ElementUI from 'element-ui' // 引入 Element
import './assets/style/base/element-variables.scss' // 引入 Element ui
import AppGlobal from './plugins/components/index.js' // 自定义组件插件
import AppDirectives from './plugins/directive/index.js' // 自定义全局指令
import filters from './plugins/filters/index.js' // 自定义过滤器
import global_ from './util/global' // 全局函数
import App from './App.vue'

// import Notification from './plugins/components/notification'
// import axios from 'axios'

// Object.defineProperty(Vue.prototype, '$axios', {value: axios})

Vue.use(VueRouter)
Vue.use(Vuex)
Vue.use(ElementUI)
Vue.use(global_)
Vue.use(AppGlobal)
// Vue.use(Notification)
Vue.use(AppDirectives)
Object.keys(filters).forEach(key => Vue.filter(key, filters[key]))
const router = createRouter()
const store = createStore()
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
